The use of image enhancement algorithms is well known in the field of digital imaging. Examples of common image enhancement algorithms that are used in various applications include exposure adjustment, tone scale adjustment, color adjustment, sharpening, noise reduction, and red-eye correction. Typically these algorithms are designed to take as input an input digital image in some input color space, and produce a modified output digital image in that same color space. There are many different color spaces that are used in digital imaging systems for various applications. These would include various standard device-independent color spaces, e.g. the well known sRGB, CIE XYZ and CIELAB color spaces, as well as device-dependent color spaces that are associated with a particular input or output device, e.g. scanner RGB, raw digital camera RGB, video RGB, printer CMY(K), etc. Unfortunately, many image enhancement algorithms behave quite differently depending on the color space that the image is in. For example, an image enhancement algorithm designed to correct “red-eye” artifacts that are often encountered in images captured using an electronic flash will typically include a step of detecting the red eyes. But since the particular code values that would be typical of a red-eye will be quite different depending on the color space in which the image is represented, detection of the red eyes will generally be color space dependent. As a result, it is often necessary to develop custom versions of each algorithm in order to achieve the desired results in each color space. This is illustrated in FIG. 1 which shows an input digital image in a first color space 10 being processed using an image enhancement algorithm adapted for the first color space 12 to produce an output digital image in the first color space 14. To apply an analogous image enhancement algorithm to an input digital image in a second color space 11, it is necessary to use an image enhancement algorithm adapted for the second color space 13, producing an output digital image in the second color space 15. The fact that the image enhancement algorithm must be rewritten, or at least reoptimized, for each color space of interest is a significant disadvantage of this approach.
To overcome the disadvantages associated with needing to develop different versions of each image enhancement algorithm for each different color space, another approach has been proposed which involves transforming all of the input images in the different input color spaces to a single reference color space, or a small number of reference color spaces, where a single version of the image enhancement algorithms can be applied, for example, as shown in G. J. Woolfe and K. E. Spaulding, “Color image processing using an image state architecture,” in 9th Congress of the International Colour Association, 442-444 (2001). This approach is illustrated in FIG. 2. A transform image to reference color space step 16 is used to transform the input digital images in the various input color spaces to a common reference color space producing an input digital image in the reference color space 17. A common version of the image enhancement algorithm adapted for the reference color space 18 can then be applied to the digital image to produce an output digital image in the reference color space 19. Using this approach, each image enhancement algorithm only needs to be developed and optimized for a single reference color space, or at most a small number of reference color spaces. This provides a significant advantage over the method shown in FIG. 1.
However, the approach show in FIG. 2 has the disadvantage that the performance of the image enhancement algorithms can sometimes be disadvantaged relative to that which can be achieved using a version of the image enhancement algorithm that is specially optimized for a particular color space. For example, it will generally be desirable to use an extended-color-gamut color space for the reference color encoding in order to avoid limiting the range of colors that can be retained through the imaging chain. Examples of such extended-color-gamut color spaces that are well known in the art include CIELAB, ROMM RGB, (E)RIMM RGB, sYCC, bg-sRGB and scRGB. If the input digital image is in a limited-color-gamut color space, such as the standard display-ready sRGB color space, then the transform image to reference color space step 16 will produce input digital images in the reference color space 17 where the color values that are outside the color gamut of the input color space are never used. Since the image enhancement algorithm adapted for the reference color space 18 must be designed to work with images that originated in any input color space, it can be necessary to make compromises in the design of the algorithm that would not be necessary if it were being optimized for one particular input color space. In the present example, it would not be known what the color gamut of the input color space was; therefore, it would not be possible to optimize a color enhancement algorithm so that it did the best job possible for the color values that were within the color gamut of the particular input color space. Thus, while there are significant system architecture advantages to the method shown in FIG. 2, it will be disadvantaged relative to the method shown in FIG. 1 for cases where it is desired to produce the absolute highest possible image quality.